package com.momo.hrmailserver;

import com.momo.hr.bean.MailConstants;
import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;


@SpringBootApplication
public class HrmailserverApplication {

    public static void main(String[] args) {
        SpringApplication.run(HrmailserverApplication.class, args);
    }

    //创建队列(名字叫做 zhubo.mail.welcome) RabbitMQ会去监听这个队列
    @Bean
    Queue queue(){
        return new Queue(MailConstants.MAIL_QUEUE_NAME);
    }
}
